import service from "../utils/request";

export const getFileList = (params: any) => {
    return service.get("/dev-api/api/v1/files/list", {params});
};


export const deleteFile = (params: any) => {
    return service.post(`/dev-api/api/v1/files/delete?id=${params.id}`, params);
};

// 导入文件转文字详情
export const getFileDetail = (params: any) => {
    return service.get("/dev-api/api/v1/files/detail", {params});
};

// 导入录音转文字详情
export const getRecordDetail = (params: any) => {
    return service.get("/dev-api/api/v1/files/aiMinutes", {params});
};

//保存编辑文件
export const saveFile = (params: any) => {
    return service.post("/dev-api/api/v1/files/save", params);
};

//上传文件
export const commonUpload = (params: any) => {
    return service.post("/dev-api/common/upload", params, {
        headers: {
            "Content-Type": "multipart/form-data",
        },
    });
};